from django.db import models
from django.utils.translation import ugettext_lazy as _

from aboutfamily import ENCODING

# Create your models here.

class LoginId(models.Model):
    regId = models.AutoField(verbose_name=_("Register ID"),primary_key=True)
    mail = models.EmailField(verbose_name=_("Email Address"))
    password = models.CharField(max_length=12,verbose_name=_("Password"))
    
    def __unicode__(self):
        return self.mail;

class Member(models.Model):
    mbr_Id = models.ForeignKey(LoginId)
    mbr_Name = models.CharField(max_length=30,verbose_name=_("Full name"))
    mbr_Gender = (
        ("M", _("Male")),
        ("F", _("Female")),
    )
    mbr_Mail = models.EmailField()
    mbr_DOB = models.DateField(verbose_name=_("birthday"))
    mbr_Work = (
        ("S", _("Student")),
        ("P", _("Part time")),
        ("F", _("Full time")),
        ("H", _("SOHO")),
    )
    mbr_Phone = models.CharField(max_length=15)
    
class Family(models.Model):
    fmlId = models.IntegerField()
    mbrId = models.IntegerField()
    relation = models.CharField(max_length=12)
